﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using DomainModel.Entities;
using NHibernate;
using DAl;
using Iesi.Collections;
using Iesi.Collections.Generic;

namespace ConsoleTest
{
    public class Program
    {
        private static ISession _session;
        private static SessionManager _helper;
        private static NHibernateSample _sample;

        public static void Main(string[] args)
        {
            _helper = new SessionManager();
            using (_session = _helper.GetSession())
            {
                _sample = new NHibernateSample(_session);

                Customer customer = _sample.GetCustomerById(1);
                int customerID = customer.CustomerID;
                ISet<Order> orders = customer.Orders;

                IList<Customer> customerList = _sample.UseHQL_GetCustomersWithOrdersHavingProduct(DateTime.Now.Date);
            }
        }
    }
}
